package com.yex.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.yex.entity.UserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-12-25 17:28:43
 */
public interface UserDao extends BaseMapper<UserEntity> {

    Integer updateMerchantStatus(@Param("status") Integer status, @Param("userId") Integer userId);

    Integer updateMerchantInfo(UserEntity params);

    UserEntity selectUserByMobile(@Param("mobile") String mobile);

    UserEntity selectUserByMobileOrUid(@Param("mobile") String mobile);

    Integer updateUserPhoto(@Param("path")String path,@Param("userId") Integer userId);

    Integer updateIntroUserCount(@Param("userId") Integer userId);

    List<UserEntity> selectUserByIdentityNumber(@Param("identityNumber") String identityNumber);

    UserEntity selectUserByLogin(@Param("mobile") String mobile, @Param("password") String password);

    Integer updateUserByLogin(@Param("userId") Integer userId, @Param("ip") String ip);

    Integer updateMoneyPassword(@Param("userId") Integer userId, @Param("password") String password);

    Integer updateModifyPassword(@Param("userId") Integer userId, @Param("password") String password);

    List<UserEntity> selectPageFilter(Page<UserEntity> fuserPage, String filter);

    Integer updatePassIdentity(@Param("userId") Integer userId);

    Integer updateNoPassIdentity(@Param("userId") Integer userId);

    List<UserEntity> selectIntroUserId(@Param("introUserId") Integer introUserId);

    Integer updateIntroUser(@Param("userId") Integer userId, @Param("introCount") Integer introCount, @Param("downCount") Integer downCount);

    int updateFrozen(UserEntity userEntity);

    int updateUnFrozen(UserEntity userEntity);

    int updateAdd(UserEntity userEntity);

    int updateReduce(UserEntity userEntity);

    int updateReduceFrozen(UserEntity userEntity);


}
